package com.liukai.personalbills.util;

public class TextUtil {

    public static final String LOGIN_SUCCESS = "登陆成功";
    public static final String LOGIN_FAIL_ERROR_PASS = "登陆失败 : 密码错误";
    public static final String LOGIN_FAIL_NO_USER = "登陆成功 : 该用户不存在";
    public static final String LOGIN_FAIL_USER_NULL = "登陆失败 : 请输入完整的信息";

    public static final String REGISTER_SUCCESS = "注册成功";
    public static final String REGISTER_FAIL_USER_EXIST = "注册失败 : 该用户已被注册";
    public static final String REGISTER_FAIL_USER_NULL = "注册失败 : 请输入完整的信息";

    public static final String UPDATE_SUCCESS = "信息修改成功";
    public static final String UPDATE_FAIL = "信息修改失败";
    public static final String UPDATE_FAIL_USER_NULL = "信息修改失败 : 请输入完整的信息";

    public static final String ADD_ACCOUNT_SUCCESS = "添加新账单记录成功";
    public static final String ADD_ACCOUNT_FAIL = "添加新账单记录失败";

    public static final String CODE_OK = "10000";
    public static final String CODE_NO = "11111";




    public static final String register = "http://192.168.43.121:8080/user/register";

    public static final int TYPE_INCOME = 1;
    public static final int TYPE_EXPEND = 2;

    public static final int TYPE_YEAR = 1;
    public static final int TYPE_MONTH = 2;
    public static final int TYPE_DAY = 3;

    public static final int REQ_ADDACTIVITY = 1;

    public static final int RES_MAINACTIVITY = 11;

    public static final String INCOMES[] = new String[]{
      "工资","兼职","礼金","奖金","其他"
    };
    public static final String EXPENDS[] = new String[]{
      "餐饮","交通","住房","美容","服饰","运动","旅行",
            "娱乐","生活","医疗","通讯","学习","礼物",
            "母婴","数码","零食","购物","其他"
    };
    public static final String UPDATE_ACCOUNT_SUCCESS = "信息修改成功";

    public static boolean isIncome(String type){

        for(int i = 0;i < INCOMES.length;i ++){
            if(type.equals(INCOMES[i])){
                return true;
            }
        }

        return false;
    }



}
